#ifndef __PLAYBACKPAGE_H
#define __PLAYBACKPAGE_H
#include <QWidget>

class QwtSlider;
class QLCDNumber;
class QToolBar;
class QAction;
class VideoWidget;
class QString;

class PlaybackPage: public QWidget
{
    Q_OBJECT
public:
    PlaybackPage(QWidget* parent=0);
    ~PlaybackPage();

public:
    void scale(double fac,double oldFac);
    VideoWidget* getVideoWidget() {return video;}

public slots:
    void moveVideo(double value);
    void update();
    void pause(bool type);
    void stopPlay();
    void changePos(double value);
    void changeDuration(double value);
    void changeSize(int width, int height);
    void openFile(QString filename);

    void prevFrame();
    void nextFrame();

    void markStart(); 
    void markEnd();

 signals:
    void markStartTime(double cur);
    void markEndTime(double cur);

private:
    void createActions();

    int m_status;
    int m_width, m_height;
    double m_factor, m_duration;
    QString m_curFile;

    VideoWidget *video;
    QwtSlider *slider;
    QLCDNumber *timeLabel;

    QToolBar* playBar;
    QAction *openAct,*pauseAct,*prevAct,*nextAct, *shotAct, *markStartAct, *markEndAct;

    QTimer *m_timer;
};
#endif;
